#include <cppcanvas/canvas.hxx>
#include <avmedia/mediawindow.hxx>
#include <svx/svdobj.hxx>
+#include <svx/svdmodel.hxx>
#include <svx/svdomedia.hxx>
#include <com/sun/star/awt/XWindow.hpp>
}
+ bool ViewMediaShape::implMediaLinkAllowed() const
+ {
+ SdrObject* pObj = SdrObject::getSdrObjectFromXShape(mxShape);
+ if (!pObj)
+ return false;
+ uno::Reference<beans::XPropertySet> xModelProps(
+ pObj->getSdrModelFromSdrObject().getUnoModel(), uno::UNO_QUERY);
+ if (!xModelProps.is())
+ return false;
+ bool bAllow = false;
+ xModelProps->getPropertyValue(u"AllowLinkUpdate"_ustr) >>= bAllow;
+ return bAllow;
+ }
+
+
bool ViewMediaShape::implInitialize( const ::basegfx::B2DRectangle& rBounds )
{
if( !mxPlayer.is() && mxShape.is() )
{
implInitializeMediaPlayer( aURL, sMimeType );
}
- else if (xPropSet->getPropertyValue(u"MediaURL"_ustr) >>= aURL)
+ else if ((xPropSet->getPropertyValue(u"MediaURL"_ustr) >>= aURL)
+ && implMediaLinkAllowed())
{
if ( maFallbackDir.getLength() &&
aURL.startsWith("file:///") &&
private:
bool implInitialize( const ::basegfx::B2DRectangle& rBounds );
+ bool implMediaLinkAllowed() const;
void implSetMediaProperties( const css::uno::Reference< css::beans::XPropertySet >& rxProps );
void implInitializeMediaPlayer( const OUString& rMediaURL, const OUString& rMimeType );
void implInitializePlayerWindow( const ::basegfx::B2DRectangle& rBounds,